{extend name="public/layout" /}
{block name="content"}
<div class="row">
  <div class="col-lg-3 col-md-3 hidden-sm hidden-xs user-info">
    <div class="card ">
        <img class="card-img-top" src="{$user->avatar}" width="200px" height="200px" alt="{{ $user->name }}">
        <div class="card-body">
            <h5><strong>个人简介</strong></h5>
            <p>{$user->introduction}</p>
            <hr>
            <h5><strong>注册于</strong></h5>
            <p>{$user->create_time}</p>
        </div>
    </div>
  </div>
  <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
    <div class="card ">
      <div class="card-body">
          <h1 class="mb-0" style="font-size:22px;">{$user->name}</h1>
      </div>
    </div>
    <hr>

    <div class="card">
      <div class="card-body">
        <ul class="nav nav-tabs">
          <li class="nav-item">
            <a class="nav-link bg-transparent <?php if(!$is_replies) { echo('active'); }?>" href="{:url('user/read', ['id' => $user->id])}">Ta 的话题</a>
          </li>
          <li class="nav-item">
            <a class="nav-link bg-transparent <?php if($is_replies) { echo('active'); }?>" href="{:url('user/read', ['id' => $user->id, 'tab' => 'replies'])}">Ta 的回复</a>
          </li>
        </ul>
        {if($is_replies)}
          {include file="user/_replies", 'topic_paginate'='$replies_paginate' /}
        {else /}
          {include file="user/_topics", 'topic_paginate'='$topic_paginate' /}
        {/if}
      </div>
    </div>

  </div>
</div>
{/block}